package com.jhmk.jhecis.common;


import java.util.function.Function;
import java.util.function.Consumer;

public class Test {


    /**
     * 接收有参方法参数
     * @param operation
     */
    public void test(Function<String,String> operation){
        operation= (a)->{
            System.out.println(a);
            return  a;
        };
        operation.apply("1");
    }

    /**
     * 接收无返回值有参方法
     * @param consumer
     */
    public void test2(Consumer<String> consumer){
        consumer= (a)->{
            System.out.println(a);
        };
        consumer.accept("1");
    }

    public <T,O> T Get(T t,O r){

        return t;
    }
}
